import { deffHttp } from '@/utils/axios';

/** 商品分页 */
export function getShopPageList(data) {
  return deffHttp.request({
    url: '/shop/page',
    method: 'POST',
    data,
  });
}

/** 添加商品 */
export function addShop(data) {
  return deffHttp.request({
    url: '/shop/add',
    method: 'POST',
    data,
  });
}

/** 编辑商品 */
export function updateShop(data) {
  return deffHttp.request({
    url: '/shop/edit',
    method: 'POST',
    data,
  });
}

/** 删除商品 */
export function deleteShop(data) {
  return deffHttp.request({
    url: '/shop/del',
    method: 'POST',
    data,
  });
}

/** 商品出库 */
export function shopOut(data) {
  return deffHttp.request({
    url: '/shop/out',
    method: 'POST',
    data,
  });
}

/** 商品退货 */
export function shopReturn(data) {
  return deffHttp.request({
    url: '/shop/return',
    method: 'POST',
    data,
  });
}